<template>
    <div class="app">
        <!-- <BackBtn /> -->
        <!-- 头部搜索框 start -->
        <TopBar />
        <!-- 头部搜索框 end -->
        <!-- 首页正文 start -->
        <div class="content-box">
            <!-- <DetailBox />
            <FilmBox />
            <home-box></home-box>-->
            <!-- <component :is=" pageName "></component> -->
            <router-view></router-view>
        </div>
        <!-- 首页正文 end -->
        <FootItem v-if=" $route.meta.showBottom " />
        <BackBtn v-if="!$route.meta.backBtn"/>
    </div>
</template>


<script>
import TopBar from "./components/TopBar.vue";
import FootItem from "./components/FootItem.vue";

// import HomeBox from "./views/HomeBox.vue";
// import FilmBox from "./views/FilmBox.vue";
// import DetailBox from "./views/DetailBox.vue";

export default {
    data() {
        return {};
    },
    // beforeMount() {
    //     this.$root.$on("changePage", arg => {
    //         this.pageName = arg;
    //     });
    //     // console.log(process.env.NODE_ENV);
    // },
    components: {
        TopBar: TopBar,
        // HomeBox,
        // FilmBox,
        FootItem
        // DetailBox
    }
};
</script>

<style lang="less" scoped>
.app {
    max-width: 750px;
    margin: 0 auto;
    position: absolute;
    top: 0px;
    bottom: 0px;
    left: 0px;
    right: 0px;
    background-color: @light;
    overflow: hidden;
    ::v-deep * {
        background-color: @light;
    }
}

.content-box {
    background-color: #cccccc;
    position: absolute;
    top: @topHeight;
    bottom: 0rem;
    left: 0rem;
    right: 0rem;
}
</style>